//cs号码
var PageCs = {
    id: "PageCs",                   //页面id
    menu: "i18n.lan.menu.basic",    //所属菜单(一级菜单名)
    title: "i18n.lan.menu.PageCs",  //标题（二级菜单名）
    icon: "icon-me-user",           //图标
    refreshBtnCmd: "DUMP_CORE",     //刷新按钮指令
    saveBtn: true,                  //保存按钮
    el: [   //控件
        {   //表格
            elname: "datagrid",
            rowCount: Device.getNodesCount("cs"),
            data: {
                width: "470px",
                columns: [
                    [{      //序号列
                            field: 'index',
                            width: 40
                        },
                        {   //号码列
                            field: 'cs',
                            editor: Easyui.editor.textbox,
                            dumpKey: "CS<n>",
                            cmdKey: "CS<n>",
                            width: 400
                        },
                    ]
                ]
            },
        },
        {   //测试短信内容文本框
            elname: "text",
            label: i18n.lan.PageCs.cs0sms,
            attrs: {
                value: "test",
                id: "pageCs_cs0sms"
            },
        },
        {   //发送按钮
            elname: "button",
            text: i18n.lan.PageCs.send,
            endRow: true,
            attrs: {
                onclick: "sendTestSms()",
                class: "smallBtn",
                title: "SSMS1,<cs0>,<content>",
            }
        },
    ],
}
//发送测试短信
function sendTestSms() {
    if (!PageCs.dgData.rows[0].cs || !$("#pageCs_cs0sms").val()) {
        alert(i18n.lan.PageCs.noPhoneNumOrSms);
        return;
    }
    sendCmd("SSMS1," + PageCs.dgData.rows[0].cs + "," + $("#pageCs_cs0sms").val());
}
CmdPage.add(PageCs); //添加到页面管理